const inquirer = require('inquirer')
const { chooseEnv } = require('./env')
function checkList() {
  const promptList = [
    {
      type: 'rawlist',
      message: '请选择项目',
      pageSize: 100,
      name: 'project',
      choices: [
        {
          name: '记加班-RN',
          value: 'RN'
        }
      ]
    }
  ]
  return inquirer.prompt(promptList)
}

function chooseProject(type) {
  checkList().then((options) => {
    // 选择环境
    chooseEnv(type, options.project)
  })
}

module.exports = {
  chooseProject
}
